import React from 'react';
import { connect } from 'dva';
import { createForm } from 'rc-form';
import { List, Icon, TextareaItem,Toast } from 'antd-mobile';
import styles from './myAppraise.css';
import CustBtn from '../../../../../../../common/buttons/Btn';
import CustomsItemNoArrow from '../CustomsItemNoArrow/CustomsItemNoArrow';
import Line from '../../../../../../../common/borderLine/Line';

const addImg = require('../../../../../../../icons/add-6CA0F7.png');

const MyAppraise = ({
  resume,
  onOk=()=>{},
  onAdd=()=>{},
  form: { getFieldProps, getFieldsValue, validateFields },
}) => {

  const selfEvaluate = resume.selfEvaluate
  // console.log('selfEvaluate');
  // console.log(selfEvaluate);
  const imgNegative = () =>{
    console.log('imgNegative click')
    document.getElementById("upload").click();
  }


  const btnProps = {
    textValue:'提交',
    onOk(){
      validData();
    },
  }


    const compileProps1 = {
      label: '个人评价',
      text: '',
    }
    const compileProps2 = {
      label: '个人评价',
      text: '编辑',
      onOk
    }

  return (
    <div className={styles.container}>

      <div className={styles.content}>
        {selfEvaluate==""?
          (
            <div>
              <CustomsItemNoArrow {...compileProps1} />
              <Line/>
              <div className={styles.addView} onClick={onAdd}>
                <img src={addImg} />
                <span>添加个人评价</span>
              </div>
            </div>
          ):(
            <div>
              <CustomsItemNoArrow {...compileProps2} />
              <Line/>
              <div className={styles.selfEvaluate}>
                {selfEvaluate}
              </div>
            </div>
          )}
      </div>

    </div>
  )
}


MyAppraise.propTypes = {
};

export default createForm()(MyAppraise);
